package com.chinaisafe.user.entity;

import java.io.Serial;
import com.chinaisafe.user.vo.request.SysTenantReqVO;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.chinaisafe.base.mybatisplus.entity.BaseEntity;
import java.io.Serializable;
import java.time.LocalDate;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

/**
 * SysTenant
 * Description：租户实体类
 *
 * @author xuefu.shu
 * @date  2024-07-12 10:22:08
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("sys_tenant")
@Schema(name = "SysTenant", description = "租户")
public class SysTenant extends BaseEntity {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "名称")
    @TableField("`name`")
    private String name;

    @Schema(description = "租户编码")
    @TableField("`code`")
    private String code;

    @Schema(description = "简称")
    @TableField("alias")
    private String alias;

    @Schema(description = "统一信用代码")
    @TableField("credit_code")
    private String creditCode;

    @Schema(description = "顶级租户")
    private Long topId;

    @Schema(description = "上级租户")
    @TableField("parent_id")
    private Long parentId;

    @Schema(description = "租户类型")
    @TableField("`type`")
    private String type;

    @Schema(description = "系统运行日")
    @TableField("use_start_date")
    private LocalDate useStartDate;

    @Schema(description = "租期")
    @TableField("tenancy_date")
    private LocalDate tenancyDate;

    @Schema(description = "是否启用")
    @TableField("`enable`")
    private Boolean enable;

    @Schema(description = "备注")
    @TableField("remark")
    private String remark;

    @Schema(description = "管理员id")
    @TableField("manager_user_id")
    private Long managerUserId;
}
